from django.contrib import admin

# Register your models here.

from myblog import models

class ArticleAdmin(admin.ModelAdmin):

	list_display = ['article_name','author','classification_id','create_time','end_time']
	list_per_page = 50
	list_filter = ('classification_id','tags_id')
	date_hierarchy = 'create_time'
	# list_editable 设置默认可编辑字段
	#list_editable = ['name', 'link']
admin.site.register(models.Article,ArticleAdmin)

class ClassIficationAdmin(admin.ModelAdmin):
	list_display = ['id','classname']
	list_per_page = 50
admin.site.register(models.ClassIfication,ClassIficationAdmin)


class ArticleTagsAdmin(admin.ModelAdmin):
	list_display = ['id','tags']
admin.site.register(models.ArticleTags,ArticleTagsAdmin)